import java.util.*;
import java.io.*;
//下标从1开始
public class code2 {
    public Read in = new Read();
    public static void main(String[] args) throws IOException {
        Scanner sc =new Scanner(System.in);
        int n = sc.nextInt();
        int x = sc.nextInt();
        int[] a = new int[n+1];
        for (int i = 1; i <=n; i++) {
            a[i] = sc.nextInt();
        }

        int l = 0;;
        int r = 0;
        int len = Integer.MAX_VALUE;
        int sum = 0;
        for (int left = 1,right = 1;right <= n; right++) {
            sum += a[right];
            while(sum>=x) {
                if (right-left+1<len) {
                    r = right;
                    l = left;
                }
                len = Math.min(len,right-left+1);
                sum-=a[left++];
            }
        }
        System.out.print(l+" "+r);
    }

    class Read {
        StringTokenizer st = new StringTokenizer("");
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        String next() throws IOException {
            while (!st.hasMoreTokens()) {
                st = new StringTokenizer(bf.readLine());
            }
            return st.nextToken();
        }
        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

    }
}
